<?php

namespace App\Models\Admin;

use Illuminate\Database\Eloquent\Model;

/**
 * Class Apage
 */
class Apage extends Model
{
    protected $table = 'apage';

    protected $primaryKey = 'apage_id';

	public $timestamps = true;

    protected $fillable = [
        'apage_title',
        'apage_abstract',
        'apage_content',
        'apage_image',
        'apage_keyword',
        'apage_publish_time',
        'apage_views',
        'apage_flag',
        'apage_state'
    ];

    protected $guarded = [];

    /**
     * @param \DateTime|int $value
     * @return false|int
     * @author dividez
     */
    public function fromDateTime($value){
        return strtotime(parent::fromDateTime($value));
    }
        
}